//
//  UILabel+Extension.swift
//  microBlog
//
//  Created by HR_W on 16/5/23.
//  Copyright © 2016年 admin. All rights reserved.
//

import UIKit

extension UILabel {

    convenience init(titie: String,font: CGFloat,textColor: UIColor,alignment: NSTextAlignment = .Center){
        
        self.init()
        self.text = titie
        self.font = UIFont.systemFontOfSize(font)
        self.textColor = textColor
        textAlignment = alignment
        if alignment == .Left {
          preferredMaxLayoutWidth = ScreenWidth - 2 * margin
        }
        numberOfLines = 0
        sizeToFit()
    }



}